import { join } from 'path'
const HOST = process.env.HOST || "localhost";
const USER = process.env.USER || "root";
const PASSWORD = process.env.PASSWORD || "root";
const DATABASE = process.env.DATABASE || "mall";
console.log("HOST:", HOST, "USER:", USER, "DATABASE:", DATABASE, "PASSWORD:", PASSWORD)
const SnakeNamingStrategy = require('typeorm-naming-strategies').SnakeNamingStrategy;
export default {
    type: 'mysql',
    host: HOST,
    port: 3306,
    username: USER,
    password: PASSWORD,
    database: DATABASE,
    entities: [join(__dirname, '../', '**/**.entity{.ts,.js}')],
    synchronize: false,
    namingStrategy: new SnakeNamingStrategy()
}